import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: () => import('@/views/Home.vue')
  },
  {
    path: '/trend',
    name: 'TrendBox',
    component: () => import('@/views/TrendBox.vue')
  },
  {
    path: '/stock',
    name: 'StockBox',
    component: () => import('@/views/StockBox.vue')
  },
  {
    path: '/hot',
    name: 'HotBox',
    component: () => import('@/views/HotBox.vue')
  },
  {
    path: '/rank',
    name: 'RankBox',
    component: () => import('@/views/RankBox.vue')
  },
  {
    path: '/map',
    name: 'MapBox',
    component: () => import('@/views/MapBox.vue')
  },
  {
    path: '/seller',
    name: 'Seller',
    component: () => import('@/views/SellerBox.vue')
  },
  {
    path: '*',
    redirect: '/'
  }
]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
